


* FIGURE 1: Reported and Actual Voter Turnout across European Democracies


cd "$data"
use "dataset.dta", clear


	gen turnout = .
	replace turnout = 74.9 if country_year=="Austria_2014"
	replace turnout = 75.6 if country_year=="Austria_2019" 
	replace turnout = 89.3 if country_year=="Belgium_2014"
	replace turnout = 88.4 if country_year=="Belgium_2019"
	replace turnout = 51.1 if country_year=="Bulgaria_2014"
	replace turnout = 53.9 if country_year=="Bulgaria_2019"
	replace turnout = 54.2 if country_year=="Croatia_2014"
	replace turnout = 52.6 if country_year=="Croatia_2019"
	replace turnout = 59.5 if country_year=="Czech Republic_2014"
	replace turnout = 60.8 if country_year=="Czech Republic_2019"
	replace turnout = 87.7 if country_year=="Denmark_2014"
	replace turnout = 84.6 if country_year=="Denmark_2019"
	replace turnout = 63.5 if country_year=="Estonia_2014"
	replace turnout = 63.7 if country_year=="Estonia_2019"
	replace turnout = 67.4 if country_year=="Finland_2014"
	replace turnout = 68.7 if country_year=="Finland_2019"
	replace turnout = 57.2 if country_year=="France_2014" 
	replace turnout = 48.7 if country_year=="France_2019" 
	replace turnout = 71.5 if country_year=="Germany_2014"
	replace turnout = 76.2 if country_year=="Germany_2019"
	replace turnout = 62.5 if country_year=="Greece_2014"
	replace turnout = 57.8 if country_year=="Greece_2019"
	replace turnout = 61.8 if country_year=="Hungary_2014"
	replace turnout = 69.7 if country_year=="Hungary_2019"
	replace turnout = 69.9 if country_year=="Ireland_2014"
	replace turnout = 65.1 if country_year=="Ireland_2019"
	replace turnout = 75.2 if country_year=="Italy_2014"	
	replace turnout = 72.9 if country_year=="Italy_2019"
	replace turnout = 58.8 if country_year=="Latvia_2014"
	replace turnout = 54.6 if country_year=="Latvia_2019"
	replace turnout = 52.9 if country_year=="Lithuania_2014"
	replace turnout = 50.6 if country_year=="Lithuania_2019"
	replace turnout = 74.6 if country_year=="Netherlands_2014"
	replace turnout = 81.9 if country_year=="Netherlands_2019"
	replace turnout = 48.9 if country_year=="Poland_2014"
	replace turnout = 61.7 if country_year=="Poland_2019"
	replace turnout = 58 if country_year=="Portugal_2014"
	replace turnout = 55.8 if country_year=="Portugal_2019"
	replace turnout = 42.8 if country_year=="Romania_2014"	
	replace turnout = 37.8 if country_year=="Romania_2019"
	replace turnout = 59.1 if country_year=="Slovakia_2014"
	replace turnout = 59.8 if country_year=="Slovakia_2019"
	replace turnout = 51.7 if country_year=="Slovenia_2014"
	replace turnout = 52.6 if country_year=="Slovenia_2019"
	replace turnout = 68.9 if country_year=="Spain_2014"
	replace turnout = 71.8 if country_year=="Spain_2019"
	replace turnout = 85.8 if country_year=="Sweden_2014"
	replace turnout = 87.2 if country_year=="Sweden_2019"
	replace turnout = 65.8 if country_year=="United Kingdom_2014"
	replace turnout = 67.6 if country_year=="United Kingdom_2019"
	replace turnout = 78.7 if country_year=="Cyprus_2014"	
	replace turnout = 66.7 if country_year=="Cyprus_2019"	
	replace turnout = 91.2 if country_year=="Luxembourg_2014"	
	replace turnout = 89.7 if country_year=="Luxembourg_2019"	
	replace turnout = 93 if country_year=="Malta_2014"	
	replace turnout = 92.1 if country_year=="Malta_2019"	
	replace turnout = 58 if country_year=="Northern Ireland_2014"	


		 collapse (mean) turnout turnout_r, by(country_year)
		 gen turnout_ = turnout_r*100
		drop turnout_r 
		rename turnout_ turnout_r
         sort turnout
		 gen country = _n
	     replace country_year = subinstr(country_year, "_", " ", .)
		 labmask country, val(country_year)
	
* reported and actual turnout in the data 

	twoway (rspike turnout turnout_r country, lcolor(gs10%80) lwidth(thin)) ///
  (scatter turnout country , ms(none) msymbol(circle) msize(small) mcolor(gs9%80) ) ///
  (scatter turnout_r country , ms(none) msymbol(circle_hollow) msize(small) mcolor(gs10%80) ) ///
  , ///
 ytitle("turnout in percent" , size(medium)) ///
 xtitle("" ) ///
 ylabel(0(20)100,gstyle(dot))  ///
 xlabel(1(1)56, labsize(vsmall) angle(vertical) valuelabel gstyle(dot)) legend(off) 
	graph save "${figures}/Figure1.gph", replace 
    graph export "${figures}/Figure1.png", as(png) replace 
	
	
	